package fun.cyhgraph.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
    //个人认为，以下括号里的内容，都可乱写，写啥都行，只要是字符串就行
    @Bean
    public OpenAPI smileQiOpenAPI() {
        return new OpenAPI()
                .info(new Info().title("骑手平台")
                        .description("骑手平台接口文档")
                        .contact(new Contact() // 添加作者信息
                                .name("rush")
                                .email("rushxb12@gmail.com")
                                .url("https://gitee.com/rushxb"))
                        .version("v1")
                        .license(new License().name("Apache 2.0")))
                .externalDocs(new ExternalDocumentation()
                        .description("外部文档")
                        .url("https://springshop.wiki.github.org/docs"));
    }



}
